/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.smarttmt.smartmanager.model;

/**
 *
 * @author nicolas
 */
public class SolicitudM {

    private int requcodi;
    private String tercdesc;
    private String proydesc;
    private String requfesi;
    private String requfeco;
    private String estadesc;
    private String proddesc;
    private String clredesc;
    private String tiredesc;
    private String requdeta;
    private String requsoli;
    private String requreprrequpersnomb;

    public SolicitudM() {
    }

    public SolicitudM(int requcodi, String tercdesc, String proydesc, String requfesi, String requfeco, String estadesc, String proddesc, String clredesc, String tiredesc, String requdeta) {
        this.requcodi = requcodi;
        this.tercdesc = tercdesc;
        this.proydesc = proydesc;
        this.requfesi = requfesi;
        this.requfeco = requfeco;
        this.estadesc = estadesc;
        this.proddesc = proddesc;
        this.clredesc = clredesc;
        this.tiredesc = tiredesc;
        this.requdeta = requdeta;
    }

    public int getRequcodi() {
        return requcodi;
    }

    public void setRequcodi(int requcodi) {
        this.requcodi = requcodi;
    }

    public String getTercdesc() {
        return tercdesc;
    }

    public void setTercdesc(String tercdesc) {
        this.tercdesc = tercdesc;
    }

    public String getProydesc() {
        return proydesc;
    }

    public void setProydesc(String proydesc) {
        this.proydesc = proydesc;
    }

    public String getRequfesi() {
        return requfesi;
    }

    public void setRequfesi(String requfesi) {
        this.requfesi = requfesi;
    }

    public String getRequfeco() {
        return requfeco;
    }

    public void setRequfeco(String requfeco) {
        this.requfeco = requfeco;
    }

    public String getEstadesc() {
        return estadesc;
    }

    public void setEstadesc(String estadesc) {
        this.estadesc = estadesc;
    }

    public String getProddesc() {
        return proddesc;
    }

    public void setProddesc(String proddesc) {
        this.proddesc = proddesc;
    }

    public String getClredesc() {
        return clredesc;
    }

    public void setClredesc(String clredesc) {
        this.clredesc = clredesc;
    }

    public String getTiredesc() {
        return tiredesc;
    }

    public void setTiredesc(String tiredesc) {
        this.tiredesc = tiredesc;
    }

    public String getRequdeta() {
        return requdeta;
    }

    public void setRequdeta(String requdeta) {
        this.requdeta = requdeta;
    }

    public String getRequsoli() {
        return requsoli;
    }

    public void setRequsoli(String requsoli) {
        this.requsoli = requsoli;
    }

    public String getRequreprrequpersnomb() {
        return requreprrequpersnomb;
    }

    public void setRequreprrequpersnomb(String requreprrequpersnomb) {
        this.requreprrequpersnomb = requreprrequpersnomb;
    }

    @Override
    public String toString() {
        return "SolicitudM{" + "requcodi=" + requcodi + ", tercdesc=" + tercdesc + ", proydesc=" + proydesc + ", requfesi=" + requfesi + ", requfeco=" + requfeco + ", estadesc=" + estadesc + ", proddesc=" + proddesc + ", clredesc=" + clredesc + ", tiredesc=" + tiredesc + ", requdeta=" + requdeta + ", requsoli=" + requsoli + ", requreprrequpersnomb=" + requreprrequpersnomb + '}';
    }
    
    public boolean solicitudMapped(org.smarttmt.smartmanager.entity.VwSolicitudes vwSolicitud){
        try {
            setClredesc(vwSolicitud.getClredesc());
            setEstadesc(vwSolicitud.getEstadesc());
            setProddesc(vwSolicitud.getProddesc());
            setProydesc(vwSolicitud.getProydesc());
            setRequfeco(vwSolicitud.getRequfeco());
            setRequcodi(vwSolicitud.getRequcodi());
            setRequfesi(vwSolicitud.getRequfesi());
            setRequdeta(vwSolicitud.getRequdeta());
            setTercdesc(vwSolicitud.getTercdesc());
            setTiredesc(vwSolicitud.getTiredesc());
            setRequsoli(vwSolicitud.getRequsoli());
            setRequreprrequpersnomb(vwSolicitud.getRequrepr()+" - "+vwSolicitud.getPersnomb());
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}
